function UserIntroCard()
{
	var user=null;
	var isfrd=false;
	//var basic=null;
	this.init=function(uid,fid_or_type,openwhich)
	{
		
		if(fid_or_type=="self")
		{	
			user=usr.getuser(uid);
		}
		else
		{
			
			var fids=usr.getfrdsid(uid);
			fids.in_array(fid_or_type)==true?isfrd=true:'';
			console.log('fids='+fids);
			if(isfrd)
			{
				user=usr.getaother(uid,fid_or_type);
			}
			else
			{
				console.log('ajax');
				_ajaxget('type=intro_basic&&needid='+fid_or_type,'get_userinfos',function(m)
				{
					if(m!='no'&&m!=undefined)
					{
						user=m;
					}
					else
					{
						console.log(m);
					}
				},function(m)
				{

				},false);
			}
		}
		console.log('user='+user);
	
		if($('#userintrocard_'+fid_or_type+'_'+uid).length>0)
		{
			$('#userintrocard_'+fid_or_type+'_'+uid).css('display','block').trigger('click');
			return false;
		}
		
		openwhich==undefined||openwhich==""?openwhich="intro":'';
		_createbox(uid,fid_or_type,openwhich);
		_bind();
		loadpage(uid,fid_or_type,openwhich);
	}

	var _createbox=function(uid,fid_or_type,openwhich)
	{
		var thisid="userintrocard_"+fid_or_type+"_"+uid;

		//var user=fid_or_type=="self"?usr.getuser(uid):usr.getaother(uid,fid_or_type);
		var usernick=user.frdname==undefined||user.frdname.length<=0?user.name:userfrdname;
		var useraccount=user.account;
		var usersign=user.sign;

		
		var info='';


		var html=
		'<!--用户资料卡 selfcard/othercard--->'+
		'<div class="userintrocard owner_'+uid+' '+(fid_or_type=="self"?"selfcard":"")+'" id='+thisid+'>'+
		'<div class="userintrocard_bg"><img src="'+(user.introcard_skin.length<=0?'img/bg/1 (16).jpg':user.introcard_skin)+'"/></div>'+
		'<div class="userintrocard_board">'+
		'<!--顶部bar-->'+
		'<div class="topbar">'+
		'<div class="userintrocard_close" title="关闭"></div>'+
		'<div class="userintrocard_tiny" title="最小化"></div>'+
		'<div class="usethisskin" title="使用'+usernick+'的资料卡皮肤"></div>'+
		'<div class="editmyskin" title="更改资料卡皮肤"></div>'+
		'</div>'+
		'<!--中部头信息框-->'+
		'<div class="introhead">'+
		'<div class="introheadbg"></div>'+
		'<div class="introheadcnt">'+
		'<div class="introheadcnt_userhead '+(fid_or_type=='self'?'introheadcnt_changeuserhead':'')+'"><img class="user_imghead100" src="'+user.img100+'"/></div>'+
		'<div class="introheadcnt_introbox">'+
		'<div class="usernameinfobox"><p class="usernick username_all">'+usernick+'</p><p class="useraccount">'+useraccount+'</p><img src="img/ContactInfoFrame/BatchRemark.png" class="addassisaccount" title="添加辅助账号"/></div>'+
		'<div class="userlevelbox">'+
		'<div class="userlevelicon_sun"></div><div class="userlevelicon_sun"></div><div class="userlevelicon_sun"></div><div class="userlevelicon_moon"></div><div class="userlevelicon_star"></div><div class="userlevelicon_star"></div><div class="userlevelphonevip"></div>'+
		'</div>'+
		'<div class="usersignbox">'+
		'<input type="text" class="usersignbox_input usersign_all" value="'+usersign+'"/>'+
		'<div class="usersigntext usersign_all">'+usersign+'</div>'+
		'<div class="moreoperation">'+
		'<div class="sharethiscard"></div>'+
		'<div class="add2mycare"></div>'+
		'<div class="'+(isfrd?'sendmsg2him':'addhim2frd')+' introheadbigbtn" title="'+(isfrd?'发送消息':'加为好友')+'" toid="'+fid_or_type+'">'+(isfrd?'发送消息':'加为好友')+'</div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'<!--夹层资料完成度显示条-->'+
		'<div class="intropercentage" title=""><div class="intropercentage_complete"></div></div>'+
		'<!--下部总内容框-->'+
		'<div class="userintrocard_column opencard_'+openwhich+'">'+
		'<!--各内容页总板-->'+
		'<div class="userintrocard_column_allboard">'+
		'<div class="userintrocard_column_allwhiteboard"></div>'+
		'<!--内容页板 各列表-->'+
		'<!--内容页板 资料userintrocard_introediting表示正在编辑-->'+
		'<div class="userintrocard_column_board userintrocard_intropage ">'+
		'<!--用户设置-->'+
		'<div class="userintrocard_intro_toptoolbar">'+
		'<div class="userintrocard_intro_toptoolbarcolor"></div>'+
		'<div class="userintrocard_intro_toptoolbarcnt">'+
		'<div class="editmyintro toptoolbarbtn">编辑资料</div>'+
		'<div class="closeedit toptoolbarbtn">关闭</div>'+
		'<div class="saveedit disable toptoolbarbtn">保存</div>'+
		'</div>'+
		'</div>'+
		'<!--资料board-->'+
		'<div class="userintrocard_introcntbox">'+
		'<!--资料cnt-->'+
		'<div class="userintrocard_introcntbox_cnt">'+
		'<!--资料page-->'+
		'<div class="userintrocard_introcntbox_page">'+
		'<div class="userintrocard_loading"></div>'+

		'<a href="javascript:;" class="openconfig_authset">权限设置</a>'+
		'</div><!--资料page end-->'+
		'</div><!--资料cnt end-->'+
		'</div><!--资料board end-->'+
		
		//editintrohtml+

		'<!----底部图标栏--->'+
		'<div class="userintrocard_introcntbottom">'+
		'<div class="userintrocard_introcntbottom_iconbarbg"></div>'+
		'<div class="userintrocard_introcntbottom_iconbar">'+
		'<div class=""></div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'<!--内容页板 相册-->'+
		'<div class="userintrocard_column_board userintrocard_photopage">'+
		'<!--顶部-->'+
		'<div class="userintrocard_photo_topbar">'+
		'<p class="photoname">04-相片1</p>'+
		'<a href="" target="_blank">进入空间相册</a> '+
		'</div><!--顶部结束-->'+
		'<!--中部大图框-->'+
		'<div class="userintrocard_photo_showbox">'+
		'<!--大图内容框-->'+
		'<div class="userintrocard_photo_showbox_frame">'+
		'<img class="photo_showbox_img" src="img/bg/1 (37).jpg"/>'+
		'<div class="photo_showbox_frame_ctrl" picid="">'+
		'<div class="photo_showbox_frame_ctrl_left">'+
		'<div class="photo_showbox_frame_ctrl_leftbtn" title="点击跳到上一张"><img src="img/ImageView/Wblog_left.png"/></div>'+
		'</div>'+
		'<div class="photo_showbox_frame_ctrl_right">'+
		'<div class="photo_showbox_frame_ctrl_rightbtn" title="点击跳到下一张"><img src="img/ImageView/Wblog_right.png"/></div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'<!--大图底部赞/评论bar  open_comment表示开启评论--->'+
		'<div class="userintrocard_photo_showbox_bar ">'+
		'<div class="userintrocard_photo_showbox_barcolor"></div>'+
		'<div class="userintrocard_photo_showbox_barcnt">'+
		'<div class="userintrocard_photo_showbox_barctrl">'+
		'<div class="photo_comment">评论</div>'+
		'<div class="photo_comment_close">取消评论</div>'+
		'<div class="photo_good">赞</div>'+
		'</div>'+
		'<div class="userintrocard_photo_showbox_barcomment">'+
		'<input type="text" class="photo_comment_input" value="最多输入140个字"/>'+
		'<div class="send_photo_comment">发表</div>'+
		'</div>'+
		'</div>'+
		'</div>'+
		'</div><!--中部大图框结束-->'+
		'<!--底部相片列表框-->'+
		'<div class="userintrocard_photo_listbox">'+
		'<div class="userintrocard_photo_list_left"><img src="img/ImageView/Wblog_left.png"/></div>'+
		'<div class="userintrocard_photo_list_cntboard">'+
		'<div class="userintrocard_photo_list_cntpage">'+
		'<div class="photo_list_box selected"><img src="img/bg/1 (37).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/1 (5).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/1 (6).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/1 (7).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/1 (11).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/1 (38).jpg"/></div>'+
		'<div class="photo_list_box"><img src="img/bg/20.jpg"/></div>'+
		'<div class="clear"></div>'+
		'</div>'+

		'</div>'+
		'<div class="userintrocard_photo_list_right"><img src="img/ImageView/Wblog_right.png"/></div>'+
		'</div><!--底部相片列表框结束-->'+
		'</div><!--内容页板 相册结束-->'+

		'<!--内容页板 动态-->'+
		'<div class="userintrocard_column_board userintrocard_dynamicpage">'+
		'<!--内容页板 动态cnt-->'+
		'<div class="userintrocard_dynamicpage_cnt">'+
		'<!--内容页板 动态page-->'+
		'<div class="userintrocard_dynamicpage_page">'+

		'<!--单个动态面板-->'+
		'<div class="userintrocard_dynamicpage_libox">'+
		'<div class="dynamic_sendtime">2014年7月21日&nbsp;12:57</div>'+
		'<div class="userintrocard_dynamicpage_licnt">'+
		'特别新闻报道！！！换号码 18825116686<img class="faceimg" src="img/Face/0.gif"/>'+
		'qiu，无张影得我清嘎<img class="faceimg" src="img/Face/6.gif"/>，技术喔d高中聚会。最紧要开心<img class="faceimg" src="img/Face/1.gif"/>'+
		'<!--photo_only 表示该动态仅仅只是上传了照片-->'+
		'<div class="dynamicpage_licnt_photos ">'+
		'<div class="dynamicpage_onlyphototips">上传20张照片到相册&nbsp;:&nbsp;<a href="javascript:;" class="openthump">未命名相册</a></div>'+
		'<div class="dynamicpage_photothump">'+
		'<div class="dynamicpage_photothump_one" pid="" title="这是一张图片"><img src="img/bg/1 (17).jpg"/></div>'+
		'<div class="dynamicpage_photothump_one" pid="" title="这是一张图片"><img src="img/bg/1 (37).jpg"/></div>'+
		'<div class="dynamicpage_photothump_one" pid="" title="这是一张图片"><img src="img/bg/1 (48).jpg"/></div>'+
		'<div class="dynamicpage_photothump_one" pid="" title="这是一张图片"><img src="img/bg/1 (7).jpg"/></div>'+
		'</div>'+
		'共5张图片'+
		'</div>'+

		'</div>'+
		'<div class="userintrocard_dynamicpage_licomment">'+

		'<div class="dynamicpage_licomment_bar">'+
		'<div class="licomment_good licomment_libtn" title="赞">赞</div>'+
		'<div class="licomment_comment licomment_libtn" title="评论">评论</div>'+
		'<div class="licomment_relay licomment_libtn" title="转发">转发</div>'+
		'<div class="licomment_collect licomment_libtn" title="收藏">收藏</div>'+
		'</div>'+
		'<div class="dynamicpage_licomment_cnt">'+
		'<div class="dynamic_comment_goodbar">'+
		'<a href="javascript:;" class="replyername" uid="">婉芝</a>,'+
		'等觉得很赞。'+
		'</div>'+
		'<!--单条评价 open_comment为开启显示回复该评价的输入框-->'+
		'<div class="dynamic_commentlist " title="以下是这条动态的评论">'+
		'<a href="javascript:;" class="replyername" title="点击查看空间" uid="">婉芝</a>&nbsp;:&nbsp;这个是你吗，怎么不像呢'+
		'<img src="img/Face/1.gif"/>'+
		'<img src="img/bg/1 (53).jpg" class="bigpic_comment" title="点击查看大图"/>'+
		'<div class="replyhim" title="回复"></div>'+

		'<div class="dynamic_commentlist_replythis" fid="">'+
		'<input class="commentlist_replythis_input"/>'+
		'<div class="commentlist_replythis_submit">发表</div>'+
		'</div>'+

		'</div>'+
		'<div class="dynamic_commentlist " title="以下是这条动态的评论">'+
		'<a href="javascript:;" class="replyername" title="点击查看空间" uid="">婉芝</a>&nbsp;:&nbsp;这个是你吗，怎么不像呢'+
		'<img src="img/Face/1.gif"/>'+
		'<img src="img/bg/1 (53).jpg" class="bigpic_comment" title="点击查看大图"/>'+
		'<div class="replyhim" title="回复"></div>'+

		'<div class="dynamic_commentlist_replythis" fid="">'+
		'<input class="commentlist_replythis_input"/>'+
		'<div class="commentlist_replythis_submit">发表</div>'+
		'</div>'+
		'</div>'+


		'</div>'+
		'<!---dynamicpage_licomment_reply_needinput显示输入回复工具栏-->'+
		'<div class="dynamicpage_licomment_reply">'+
		'<input class="licomment_reply_input" value="我也说一句"/>'+
		'<div class="licomment_reply_inputmore">'+
		'<div class="licomment_reply_inputcount">0/2000</div>'+
		'<div class="licomment_reply_inputsubmit">发表</div>'+
		'</div>'+
		'</div>'+

		'</div>'+

		'</div><!--单个动态面板结束-->'+

		'<!--加载响应信息显示面板-->'+
		'<div class="userintrocard_dynamicpage_feedback nomore">'+
		'<div class="nomore_board"><a href="javascript:;" class="link_gotozone">去空间查看更多动态</a></div>'+
		'<div class="loading_board">正在加载...</div>'+
		'<div class="fail_board">加载失败</div>'+
		'</div><!--加载响应信息显示面板结束-->'+

		'</div><!--内容页板 动态page结束-->'+
		'</div><!--内容页板 动态cnt结束-->'+
		'</div><!--内容页板 动态结束-->'+

		'<!--内容页板 亲密度-->'+
		'<div class="userintrocard_column_board userintrocard_intimacypage">'+
		'<!--内容页板 亲密度cnt-->'+
		'<div class="userintrocard_intimacypage_cnt">'+
		'<!--内容页板 亲密度page-->'+
		'<div class="userintrocard_intimacypage_page">'+
		'<!--概述-->'+
		'<div class="intimacypage_summary">'+
		'<div class="intimacy_summary_left">'+
		'<div class="title">'+
		'<div class="self2frd"><p class="summary_me">我</p><p>对</p><p class="summary_frd">_飛兲潴~</p></div>'+
		'<div class="switchobj">切换</div>'+
		'</div>'+
		'<div class="befrddays">'+
		'<p class="tips">成为QQ好友已经</p>'+
		'<div class="tiktokdays">'+
		'<div class="tiktokcard">'+
		'<div class="tiktokcardbg">'+
		'<div class="tiktokcardbgtop"></div>'+
		'<div class="tiktokcardbgbottom"></div>'+
		'</div>'+
		'<div class="tiktokcardnum">2</div>'+
		'</div>'+
		'<div class="tiktokcard">'+
		'<div class="tiktokcardbg">'+
		'<div class="tiktokcardbgtop"></div>'+
		'<div class="tiktokcardbgbottom"></div>'+
		'</div>'+
		'<div class="tiktokcardnum">3</div>'+
		'</div>'+
		'</div>'+
		'<p class="tips">天</p>'+
		'</div>'+
		'</div>'+
		'<div class="intimacy_summary_split"></div>'+
		'<div class="intimacy_summary_right">'+
		'<div class="intimacy_summary_rtop">'+
		'<div class="intimacy_num">99</div>'+
		'<div class="intimacy_summary_more"></div>'+
		'</div>'+
		'<a href="javascript:;" class="link_viewintimacy">查看亲密度排名</a>'+
		'</div>'+
		'</div><!---概述end-->'+
		'<!--我们的故事-->'+
		'<div class="intimacypage_story">'+
		'<div class="intimacypage_story_titlebar">我们的故事</div>'+
		'<div class="intimacypage_story_intertimescount">'+
		'<div class="timestype interview" title="次互动访问">'+
		'<p class="timesnum">23</p>次互动访问'+
		'</div>'+
		'<div class="timestype commonfrd" title="位共同好友">'+
		'<p class="timesnum">45</p>位共同好友'+
		'</div>'+
		'<div class="timestype commongrp" title="个共同群">'+
		'<p class="timesnum">68</p>个共同群'+
		'</div>'+
		'</div>'+
		'<div class="intimacypage_story_intercommon">'+
		'<div class="intimacy_intercommon_list">我们都住在中国广东广州</div>'+
		'<div class="intimacy_intercommon_list">我们都住在中国广东广州</div>'+
		'<div class="intimacy_intercommon_list">我们都住在中国广东广州</div>'+
		'</div>'+
		'</div><!--我们的故事end-->'+
		'<!---互动 interact_nothing即为暂无互动信息-->'+
		'<div class="intimacypage_interact interact_nothing">'+
		'<div class="intimacypage_interact_titlebar">最近互动</div>'+
		'<div class="intimacypage_interact_nothing">暂无互动信息</div>'+
		'<div class="intimacypage_interact_content">'+
		'<div class="intimacypage_interact_libox"></div>'+
		'<div class="intimacypage_interact_libox"></div>'+
		'<div class="intimacypage_interact_libox"></div>'+
		'</div>'+
		'</div><!---互动end-->'+

		'<!--加载更多显示面板-->'+
		'<div class="userintrocard_intimacypage_more">'+
		'<a href="javascript:;" class="link_gotodetail">去查看更多动态</a>'+
		'</div><!--加载更多显示面板结束-->'+

		'</div><!--内容页板 亲密度page结束-->'+
		'</div><!--内容页板 亲密度cnt结束-->'+
		'</div><!--内容页板 亲密度结束-->'+

		'<!--内容页板 账户-->'+
		'<div class="userintrocard_column_board userintrocard_accountpage"></div>'+
		'<!--内容页板 各列表end-->'+
		'</div><!--各内容页总板end-->'+
		'<!--翻页按钮bar-->'+
		'<div class="userintrocard_column_pagebtnbar">'+
		'<div class="userintrocard_column_pagebtnbarbg"></div>'+
		'<div class="userintrocard_column_pagebtnbarcnt">'+
		'<div class="userintrocard_column_pagebtn column_pagebtn_intro"><img src="img/ContactInfoFrame/tabbtn_info.png"/>资料</div>'+
		'<div class="userintrocard_column_pagebtn column_pagebtn_photo"><img src="img/ContactInfoFrame/tabbtn_photo.png"/>相册</div>'+
		'<div class="userintrocard_column_pagebtn column_pagebtn_dynamic"><img src="img/ContactInfoFrame/tabbtn_feeds.png"/>动态</div>'+
		'<div class="userintrocard_column_pagebtn column_pagebtn_intimacy"><img src="img/ContactInfoFrame/Story_Rainbow.png"/>亲密度</div>'+
		'<div class="userintrocard_column_pagebtn column_pagebtn_account">账户</div>'+
		'</div>'+
		'</div><!--翻页按钮barend-->'+
		'</div><!--下部总内容框end-->'+

		'</div>'+
		'</div>';

		$('body').append(html);
		
	}
	var loadpage=function(uid,fid_or_type,openwhich)
	{
		
		var infocard=$('#userintrocard_'+fid_or_type+'_'+uid);
		if(openwhich=="intro")
		{
			//var ubasic=usr.getuser(uid);
			var cntbox=infocard.find('.userintrocard_introcntbox_page');
			cntbox.html('');
			if(fid_or_type=='self'&&infocard.find('.userintrocard_editintrocntbox').length>0)
			{
				infocard.find('.userintrocard_intropage').removeClass('userintrocard_introediting');
				infocard.find('.userintrocard_editintrocntbox').remove();
				
			}
			_ajaxget('type=intro_detail&&needid='+(fid_or_type=="self"?uid:fid_or_type),'get_userinfos',function(detail)
			{
				var html='';
				if(detail!='no'&&detail!=undefined)
				{
					if(fid_or_type=="self")
					{
						setpercentbar(uid,fid_or_type,user,detail);
						var edithtml=geteditpage(uid,user,detail);
						infocard.find('.userintrocard_introcntbox').after(edithtml);
						setintroplace(infocard.find('.hometownboard'),1);
						setintroplace(infocard.find('.livetownboard'),1);
					}
					html=setintropage(uid,fid_or_type,user,detail);
					console.log(html);
				}
				else
				{
					console.log(detail);
				}
				cntbox.html(html);
				_infobind();

			},function(m)
			{

			},false);
		}
		else if(openwhich=="photo")
		{
			var cntbox=infocard.find('.userintrocard_photopage');
			_ajaxget('type=intro&&needid='+(fid_or_type=="self"?uid:fid_or_type),'get_userinfos',function(m)
			{
				if(m!='no'&&m!=undefined)
				{
					
				}
				else
				{

				}

			},function(m)
			{

			},false);
		}
		else if(openwhich=="dynamic")
		{
			var cntbox=infocard.find('.userintrocard_dynamicpage_page');
			_ajaxget('type=intro&&needid='+(fid_or_type=="self"?uid:fid_or_type),'get_userinfos',function(m)
			{
				if(m!='no'&&m!=undefined)
				{
					
				}
				else
				{

				}

			},function(m)
			{

			},false);
		}
		else if(openwhich=="intimacy")
		{
			var cntbox=infocard.find('.userintrocard_intimacypage_page');
			_ajaxget('type=intro&&needid='+(fid_or_type=="self"?uid:fid_or_type),'get_userinfos',function(m)
			{
				if(m!='no'&&m!=undefined)
				{
					
				}
				else
				{

				}

			},function(m)
			{

			},false);
		}
		else if(openwhich=="account")
		{
			var cntbox=infocard.find('.');
			_ajaxget('type=intro&&needid='+(fid_or_type=="self"?uid:fid_or_type),'get_userinfos',function(m)
			{
				if(m!='no'&&m!=undefined)
				{
					
				}
				else
				{

				}

			},function(m)
			{

			},false);
		}
	}

	//获取资料页html
	var setintropage=function(uid,fid_or_type,basic,detail)
	{
		/*if(info_arr==undefined||info_arr==null||info.length<=0)
		{
			return '';
		}*/
		var html='';
		//console.log(detail);
		if(detail.imgshow.length>0)
		{
			var imgs=detail.imgshow.split(",");
			if(imgs.length>0)
			{
				var imgbox='';
				for(var i=0;i<imgs.length;i++)
				{
					imgbox+=imgs[i].length<=0?'':'<div class="userintrocard_introphoto_cnt"><img src="'+imgs[i]+'"/></div>';
				}
				html+='<!--资料相册-->'+
				'<div class="userintrocard_introphotolist">'+
				'<div class="userintrocard_introphoto_left">'+
				'<div class="userintrocard_introphoto_graycolor"></div>'+
				'<div class="userintrocard_introphoto_leftbtn disabled"></div>'+
				'</div>'+
				'<div class="userintrocard_introphoto_box">'+
				'<div class="userintrocard_introphoto_boxpage" page=1>'+
				imgbox+
				'</div>'+
				'</div>'+
				'<div class="userintrocard_introphoto_right">'+
				'<div class="userintrocard_introphoto_graycolor"></div>'+
				'<div class="userintrocard_introphoto_rightbtn '+(detail.imgshow.length>6?'':'disabled')+'" ></div>'+
				'</div>'+
				'</div>';
			}
		}
		
		html+='<!--资料详细-->'+
		'<ul class="userintrocard_introlist introlist_account"><!--账号信息-->'+
		'<li><span class="title">账&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号&nbsp;:</span><span class="content">'+basic.account+'</span><div class="clear"></div></li>'+
		'<li><span class="title">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称&nbsp;:</span><span class="content">'+basic.name+'</span><div class="clear"></div></li>';
		html+=fid_or_type=="self"?'':'<li class="introli_nameremark"><span class="title">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注&nbsp;:</span><span class="content"><span class="remarksfrdname">'+(basic.frdname!=undefined&&basic.frdname.length>0?basic.frdname:'-')+'</span><span class="addfrdnameremarks '+(isfrd?'introbtn':'introdisablebtn')+'"><img src="img/ContactInfoFrame/BatchRemark.png"/>'+(basic.frdname!=undefined&&basic.frdname.length>0?'修改':'添加')+'备注</span></span><div class="clear"></div></li>';
		
		//如果是其他人的资料卡且此人是好友
		if(fid_or_type!="self"&&isfrd)
		{
			//获取所有组
			var gps=usr.getpro(uid,'frdgrp');
			//获取该好友所在的分组id
			var gid=usr.getaother(uid,fid_or_type).gid;
			//console.log('gid='+gid);
			//如果没有分组，则是默认‘我的好友’分组
			var selectstr=
			'<li class="introli_togrp">'+
			'<span class="title">分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;组&nbsp;:</span>'+
			'<span class="content">'+
			'<div class="putfrd2grp">'+
			'<select>'+
			'<option value="0" '+(0==gid?'select':'')+'>我的好友</option>';

			if(gps.length>0)
			{
				for(var i=0;i<gps.length;i++)
				{
					selectstr+='<option value="'+gps[i].id+'" '+(gps[i].id==gid?'select':'')+'>'+gps[i].gname+'</option>';
				}
			}
			selectstr+=
			'</select>'+
			'</div>'+
			'</span><div class="clear"></div>'+
			'</li>';
			html+=selectstr;
		}

		detail.selfintro.length>0?html+='<li><span class="title">个人说明</span><span class="content">'+detail.selfintro+'</span><div class="clear"></div></li>':'';
		html+='</ul>';
		
		
		html+='<!--资料详细-->'+
		'<ul class="userintrocard_introlist introlist_info"><!--个人资料信息-->'+
		'<li class="introli_oneinfo"><span class="title">个&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人&nbsp;:</span><span class="content">';
		var sex='';
		if(basic.sex=='male')
		{
			sex='男&nbsp;&nbsp;';
		}
		else if(basic.sex=='female')
		{
			sex='女&nbsp;&nbsp;';
		}
	
		html+=sex+''+(basic.birthday.length>0&&parseInt(basic.birthday)>0?(new Date().getFullYear()-new Date(basic.birthday*1000).getFullYear())+'岁&nbsp;&nbsp;':'')+''+(basic.birthday.length>0&&parseInt(basic.birthday)>0?(new Date(basic.birthday*1000).getMonth())+1+'月'+(new Date(basic.birthday*1000).getDate())+'日(公历生日)&nbsp;&nbsp;':'')+(detail.zodiac.length>0?'属'+detail.zodiac+'&nbsp;&nbsp;':'')+(detail.constellation.length>0?detail.constellation+'&nbsp;&nbsp;':'')+(detail.blood.length>0?detail.blood+'型血&nbsp;&nbsp;':'');
		html+='</span><div class="clear"></div></li>';

		html+=basic.hometown.length>0?'<li class="introli_hometown"><span class="title">故&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;乡&nbsp;:</span><span class="content">'+basic.hometown+'</span><div class="clear"></div></li>':'';
		html+=basic.livetown.length>0?'<li class="introli_livetown"><span class="title">所&nbsp;在&nbsp;地&nbsp;:</span><span class="content">'+basic.livetown+'</span><div class="clear"></div></li>':'';
		html+='</ul>';
		
		html+='<!--资料详细-->'+
		'<ul class="userintrocard_introlist introlist_contact"><!--联系方式信息-->';
		html+=detail.tel.length>0?'<li><span class="title">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话&nbsp;:</span><span class="content">'+detail.tel+'</span><div class="clear"></div></li>':'';
		html+=detail.phone.length>0?'<li class="introli_phone"><span class="title">手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机&nbsp;:</span><span class="content">'+detail.phone+'</span><div class="clear"></div></li>':'';
		html+=detail.homepage.length>0?'<li><span class="title">主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页&nbsp;:</span><span class="content"><a class="frdpagelink" href="http://'+detail.homepage+'" target="_blank">'+detail.homepage+'</a></span><div class="clear"></div></li>':'';
		html+=basic.email.length>0?'<li><span class="title">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱&nbsp;:</span><span class="content">'+basic.email+'</span><div class="clear"></div></li>':'';
		html+=detail.address.length>0?'<li><span class="title">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址&nbsp;:</span><span class="content">'+detail.address+'</span><div class="clear"></div></li>':'';
		html+=detail.mailcode.length>0?'<li><span class="title">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编&nbsp;:</span><span class="content">'+detail.mailcode+'</span><div class="clear"></div></li>':'';
		html+='</ul>';
		
		html+='<!--资料详细--><ul class="userintrocard_introlist introlist_society"><!--个人社会信息--><li>'+
		'<span class="title">Q&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;龄&nbsp;:</span><span class="colcontent">'+(new Date().getFullYear()-new Date(detail.regtime*1000).getFullYear())+'年</span>';

		html+=detail.language.length>0?'<span class="title">语&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;言&nbsp;:</span><span class="colcontent">'+detail.language+'</span>':'';
		html+='<div class="clear"></div></li>';

		html+=detail.realname.length>0||detail.englishname.length>0?'<li>':'';
		html+=detail.realname.length>0?'<span class="title">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名&nbsp;:</span><span class="colcontent">'+detail.realname+'</span>':'';
		html+=detail.englishname.length>0?'<span class="title">英&nbsp;文&nbsp;名&nbsp;:</span><span class="colcontent">'+detail.englishname+'</span>':'';
		html+=detail.realname.length>0||detail.englishname.length>0?'<div class="clear"></div></li>':'';
		
		html+=detail.career.length>0||detail.position.length>0?'<li>':'';
		html+=detail.career.length>0?'<span class="title">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业&nbsp;:</span><span class="colcontent">'+detail.career+'</span>':'';
		html+=detail.position.length>0?'<span class="title">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;:</span><span class="colcontent">'+detail.position+'</span>':'';
		html+=detail.career.length>0||detail.position.length>0?'<div class="clear"></div></li>':'';

		html+=detail.company.length>0?'<li class="introli_"><span class="title">公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司&nbsp;:</span><span class="colcontent">'+detail.company+'</span><div class="clear"></div></li>':'';

		html+='</ul>';
		
		html+=detail.edu.length>0||detail.school.length>0?'<!--资料详细--><ul class="userintrocard_introlist introlist_edu"><!--学历信息--><li>':'';
		html+=detail.edu.length>0?'<span class="title">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历&nbsp;:</span><span class="colcontent">'+detail.edu+'</span>':'';
		html+=detail.school.length>0?'<span class="title">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校&nbsp;:</span><span class="colcontent">'+detail.school+'</span>':'';
		html+=detail.edu.length>0||detail.school.length>0?'<div class="clear"></div></li></ul>':'';
		
		if(fid_or_type!="self")
		{
			if(detail.remark!=undefined&&detail.remark!=null&&detail.remark.length>0)
			{
				html+='<!--资料详细-->'+
				'<ul class="userintrocard_introlist introlist_remarks"><!--备注信息-->'+
				'<li>'+
				'<span class="title">备注信息</span><span class="content">'+detail.remark+'<div class="addremarks2thisfrd '+(isfrd?'introbtn':'introdisablebtn')+'"><img src="img/ContactInfoFrame/BatchRemark.png"/>修改备注信息</div></span><div class="clear"></div>'+
				'</li>'+
				'</ul>';
			}
			else
			{
				html+='<!--资料详细-->'+
				'<ul class="userintrocard_introlist introlist_remarks"><!--备注信息-->'+
				'<li>'+
				'<span class="title">备注信息</span><span class="content">您还没有对 '+(basic.frdname!=undefined&&basic.frdname.length>0?basic.frdname:basic.name)+' 添加备注信息。备注信息可以帮助您记录好友的真实资料，联系方式，事件行为等一系列信息<div class="addremarks2thisfrd '+(isfrd?'introbtn':'introdisablebtn')+'"><img src="img/ContactInfoFrame/BatchRemark.png"/>添加备注信息</div></span><div class="clear"></div>'+
				'</li>'+
				'</ul>';
			}
		}
		return html;
	}

	//获取编辑资料页html
	var geteditpage=function(uid,basic,detail)
	{
		var imgbox='';
		var imgs=detail.imgshow.split(",");
		if(imgs.length>0)
		{
			for(var i=0;i<imgs.length;i++)
			{
				imgbox+=imgs[i].length<=0?'':'<div class="userintrocard_editintrophoto_cnt"><img src="'+imgs[i]+'" class="editintrophoto_ready"/><img src="img/ContactInfoFrame/qzone/btn_close_highlight.png" class="editintrophoto_del"/></div>';
			}
		}
		tempval.setone(uid,'userdetail','imgshow',detail.imgshow);
		var ages='';
		var years=new Date().getFullYear()-1900;
		var userage=detail.age==0?new Date().getFullYear()-new Date(basic.birthday*1000).getFullYear():detail.age;
		for(var i=0;i<years;i++)
		{
			ages+='<option value="'+i+'" '+(userage==i?'selected':'')+'>'+i+'</option>';
		}
		
		
		var bday={};
		bday.date=new Date(basic.birthday*1000);
		bday.year=bday.date.getFullYear();
		bday.month=bday.date.getMonth()+1;
		bday.day=bday.date.getDate();
		
		bday.yhtml='';
		for(var i=0;i<new Date().getFullYear()-1900;i++)
		{
			var y=new Date().getFullYear()-i;
			bday.yhtml+='<option value="'+y+'" '+(y==bday.year?'selected':'')+'>'+y+'年</option>';
		}
		bday.mhtml='';
		for(var i=1;i<=12;i++)
		{
			bday.mhtml+='<option value="'+i+'" '+(i==bday.month?'selected':'')+'>'+i+'月</option>';
		}
		bday.days=howmuchdays(bday.year,bday.month);
		bday.dhtml='';
		for(var i=1;i<=bday.days;i++)
		{
			bday.dhtml+='<option value="'+i+'" '+(i==bday.day?'selected':'')+'>'+i+'日</option>';
		}
		

		var editintrohtml=
		'<!--修改资料board-->'+
		'<div class="userintrocard_editintrocntbox">'+
		'<!--修改资料cnt-->'+
		'<div class="userintrocard_editintrocntbox_cnt">'+
		'<!--修改资料page-->'+
		'<div class="userintrocard_editintrocntbox_page">'+
		'<!--修改资料相册-->'+
		'<div class="userintrocard_editintrophotolist">'+
		'<div class="userintrocard_editintrophoto_left">'+
		'<div class="userintrocard_editintrophoto_graycolor"></div>'+
		'<div class="userintrocard_editintrophoto_leftbtn disabled"></div>'+
		'</div>'+
		'<div class="userintrocard_editintrophoto_box">'+
		'<div class="userintrocard_editintrophoto_boxpage" page=1>'+
		'<div class="userintrocard_editintrophoto_add" title="选择照片"><input type="file" name="editintrophoto_addinput" class="editintrophoto_addinput"/></div>'+
		imgbox+
		'</div>'+
		'</div>'+
		'<div class="userintrocard_editintrophoto_right">'+
		'<div class="userintrocard_editintrophoto_graycolor"></div>'+
		'<div class="userintrocard_editintrophoto_rightbtn '+(detail.imgshow.length>5?'':'disabled')+'"></div>'+
		'</div>'+
		'</div>'+
		'<!--修改资料详细-->'+
		'<ul class="userintrocard_editintrolist"><!--账号信息-->'+
		/*'<li class="">个性签名:<div class="mulitinput inputframe detailchange_sign" contenteditable="true">'+basic.sign+'</div></li>'+*/
		'<li class="">个性签名:<textarea class="mulitinput inputframe basicchange_sign usersign_all">'+basic.sign+'</textarea></li>'+
		'<li class="">个人说明:<textarea class="mulitinput inputframe detailchange_selfintro">'+(detail.selfintro==undefined||detail.selfintro==null?'':detail.selfintro)+'</textarea></li>'+
		'<li>'+
		'<span class="">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称&nbsp;:<input type="text" class="inputframe basicchange_name" value="'+basic.name+'"/></span>'+
		'<span class="">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名&nbsp;:<input type="text" class="inputframe detailchange_realname" value="'+detail.realname+'"/></span>'+
		'</li>'+
		'<li>'+
		'<span class="">英&nbsp;文&nbsp;名&nbsp;:<input type="text" class="inputframe detailchange_englishname" value="'+detail.englishname+'"/></span>'+
		'<span class="">语&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;言&nbsp;:<input type="text" class="inputframe detailchange_language" value="'+detail.language+'"/></span>'+
		'</li>'+
		'<li>'+
		'<span class="">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_sex">'+
		'<option value="male" '+(basic.sex=="male"?'select':'')+'>男</option>'+
		'<option value="female" '+(basic.sex=="female"?'select':'')+'>女</option>'+
		'</select></span>'+

		'</span>'+
		'<span class="">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;龄&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_age">'+
		ages+
		'</select></span>'+

		'</span>'+
		'</li>'+
		'<li class="li_birthday">'+
		'<span class="birthdayselect">生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日&nbsp;:<input type="text" class="inputframe basicchange_bitrthday" value="'+(new Date(basic.birthday*1000).getFullYear()+'年&nbsp;'+(new Date(basic.birthday*1000).getMonth()+1)+'月&nbsp;'+new Date(basic.birthday*1000).getDate()+'日')+'"/></span>'+
		'<span class="">生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;肖&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_zodiac">'+
		'<option value="" '+(detail.zodiac.length<=0?'selected':'')+'></option>'+
		'<option value="鼠" '+(detail.zodiac=='鼠'?'selected':'')+'>鼠</option>'+
		'<option value="牛" '+(detail.zodiac=='牛'?'selected':'')+'>牛</option>'+
		'<option value="虎" '+(detail.zodiac=='虎'?'selected':'')+'>虎</option>'+
		'<option value="兔" '+(detail.zodiac=='兔'?'selected':'')+'>兔</option>'+
		'<option value="龙" '+(detail.zodiac=='龙'?'selected':'')+'>龙</option>'+
		'<option value="蛇" '+(detail.zodiac=='蛇'?'selected':'')+'>蛇</option>'+
		'<option value="马" '+(detail.zodiac=='马'?'selected':'')+'>马</option>'+
		'<option value="羊" '+(detail.zodiac=='羊'?'selected':'')+'>羊</option>'+
		'<option value="猴" '+(detail.zodiac=='猴'?'selected':'')+'>猴</option>'+
		'<option value="鸡" '+(detail.zodiac=='鸡'?'selected':'')+'>鸡</option>'+
		'<option value="狗" '+(detail.zodiac=='狗'?'selected':'')+'>狗</option>'+
		'<option value="猫" '+(detail.zodiac=='猫'?'selected':'')+'>猫</option>'+
		'<option value="羊驼" '+(detail.zodiac=='羊驼'?'selected':'')+'>羊驼</option>'+
		'</select></span>'+
		'</span>'+
		'<div class="editselectboard selectboard_birthday">'+
		'<div class="subselector year"><select>'+
		/*'<option value="0">2015年</option>'+*/
		bday.yhtml+
		'</select></div>'+
		'<div class="subselector month"><select>'+
		/*'<option value="0">1月</option>'+*/
		bday.mhtml+
		'</select></div>'+
		'<div class="subselector day"><select>'+
		/*'<option value="0">1日</option>'+*/
		bday.dhtml+
		'</select></div>'+
		'<div class="clear"></div>'+
		'</div>'+
		'</li>'+
		'<li>'+
		'<span class="">星&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;座&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_constellation">'+
		'<option value="" '+(detail.constellation==''?'selected':'')+'></option>'+
		'<option value="水瓶座" '+(detail.constellation=='水瓶座'?'selected':'')+'>水瓶座</option>'+
		'<option value="双鱼座" '+(detail.constellation=='双鱼座'?'selected':'')+'>双鱼座</option>'+
		'<option value="白羊座" '+(detail.constellation=='白羊座'?'selected':'')+'>白羊座</option>'+
		'<option value="金牛座" '+(detail.constellation=='金牛座'?'selected':'')+'>金牛座</option>'+
		'<option value="双子座" '+(detail.constellation=='双子座'?'selected':'')+'>双子座</option>'+
		'<option value="巨蟹座" '+(detail.constellation=='巨蟹座'?'selected':'')+'>巨蟹座</option>'+
		'<option value="狮子座" '+(detail.constellation=='狮子座'?'selected':'')+'>狮子座</option>'+
		'<option value="处女座" '+(detail.constellation=='处女座'?'selected':'')+'>处女座</option>'+
		'<option value="天秤座" '+(detail.constellation=='天秤座'?'selected':'')+'>天秤座</option>'+
		'<option value="天蝎座" '+(detail.constellation=='天蝎座'?'selected':'')+'>天蝎座</option>'+
		'<option value="射手座" '+(detail.constellation=='射手座'?'selected':'')+'>射手座</option>'+
		'<option value="摩羯座" '+(detail.constellation=='摩羯座'?'selected':'')+'>摩羯座</option>'+
		'</select></span>'+
		'</span>'+
		'<span class="">血&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_blood">'+
		'<option value="" '+(detail.blood==''?'selected':'')+'></option>'+
		'<option value="A" '+(detail.blood=='A'?'selected':'')+'>A型血</option>'+
		'<option value="B" '+(detail.blood=='B'?'selected':'')+'>B型血</option>'+
		'<option value="AB" '+(detail.blood=='AB'?'selected':'')+'>AB型血</option>'+
		'<option value="O" '+(detail.blood=='O'?'selected':'')+'>O型血</option>'+
		'<option value="其他" '+(detail.blood=='其他'?'selected':'')+'>其他血型</option>'+
		'</select></span>'+

		'</span>'+
		'</li>'+
		'<li>'+
		'<span class="">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_career">'+
		'<option value="" '+(detail.career==''?'selected':'')+'></option>'+
		'<option value="计算机/互联网/通讯" '+(detail.career=='计算机/互联网/通讯'?'selected':'')+'>计算机/互联网/通讯</option>'+
		'<option value="生产/工艺/制造" '+(detail.career=='生产/工艺/制造'?'selected':'')+'>生产/工艺/制造</option>'+
		'<option value="医疗/护理/制药" '+(detail.career=='医疗/护理/制药'?'selected':'')+'>医疗/护理/制药</option>'+
		'<option value="金融/银行/投资/保险" '+(detail.career=='金融/银行/投资/保险'?'selected':'')+'>金融/银行/投资/保险</option>'+
		'<option value="商业/服务业/个体经营" '+(detail.career=='商业/服务业/个体经营'?'selected':'')+'>商业/服务业/个体经营</option>'+
		'<option value="文化/广告/传媒" '+(detail.career=='文化/广告/传媒'?'selected':'')+'>文化/广告/传媒</option>'+
		'<option value="娱乐/艺术/表演" '+(detail.career=='娱乐/艺术/表演'?'selected':'')+'>娱乐/艺术/表演</option>'+
		'<option value="律师/法务" '+(detail.career=='律师/法务'?'selected':'')+'>律师/法务</option>'+
		'<option value="教育/培训" '+(detail.career=='教育/培训'?'selected':'')+'>教育/培训</option>'+
		'<option value="公务员/行政/事业单位" '+(detail.career=='公务员/行政/事业单位'?'selected':'')+'>公务员/行政/事业单位</option>'+
		'<option value="模特" '+(detail.career=='模特'?'selected':'')+'>模特</option>'+
		'<option value="空姐" '+(detail.career=='空姐'?'selected':'')+'>空姐</option>'+
		'<option value="学生" '+(detail.career=='学生'?'selected':'')+'>学生</option>'+
		'<option value="其他" '+(detail.career=='其他'?'selected':'')+'>其他</option>'+
		'</select></span>'+

		'</span>'+
		'<span class="">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;:<input type="text" class="inputframe detailchange_position" value="'+detail.position+'"/></span>'+
		'</li>'+
		'<li>公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司&nbsp;:<textarea class="mulitinput inputframe company detailchange_company">'+detail.company+'</textarea><div class="clear"></div></li>'+
		'<li>'+
		'<span class="">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历&nbsp;:'+
		'<span class="inputframe selector"><select class="userinfosetselect_edu">'+
		'<option value="" '+(detail.edu==''?'selected':'')+'></option>'+
		'<option value="小学及以下" '+(detail.edu=='小学及以下'?'selected':'')+'>小学及以下</option>'+
		'<option value="初中" '+(detail.edu=='初中'?'selected':'')+'>初中</option>'+
		'<option value="高中" '+(detail.edu=='高中'?'selected':'')+'>高中</option>'+
		'<option value="中专" '+(detail.edu=='中专'?'selected':'')+'>中专</option>'+
		'<option value="大专" '+(detail.edu=='大专'?'selected':'')+'>大专</option>'+
		'<option value="本科" '+(detail.edu=='本科'?'selected':'')+'>本科</option>'+
		'<option value="研究生" '+(detail.edu=='研究生'?'selected':'')+'>研究生</option>'+
		'<option value="博士生及以上" '+(detail.edu=='博士生及以上'?'selected':'')+'>博士生及以上</option>'+
		'<option value="其他" '+(detail.edu=='其他'?'selected':'')+'>其他</option>'+
		'</select></span>'+
		'</span>'+
		'<span class="">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校&nbsp;:<input type="text" class="inputframe detailchange_school " value="'+detail.school+'"/></span>'+
		'</li>'+
		'<li>'+
		'<span class="">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话&nbsp;:<input type="text" class="inputframe detailchange_tel " value="'+detail.tel+'"/></span>'+
		'<span class="">手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机&nbsp;:<input type="text" class="inputframe detailchange_phone " value="'+detail.phone+'"/></span>'+
		'</li>'+
		'<li class="">'+
		'邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱&nbsp;:<input type="text" class="inputframe basicchange_email " value="'+basic.email+'"/>'+
		'</li>'+
		'<li class="">'+
		'主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页&nbsp;:<input type="text" class="inputframe detailchange_homepage " value="'+detail.homepage+'"/>'+
		'</li>'+
		'<li class="hometownselect">'+
		'故&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;乡&nbsp;:<input type="text" class="inputframe basicchange_hometown " value="'+basic.hometown+'"/>'+
		'<div class="editselectboard selectboard_area hometownboard">'+
		'<div class="subselector country"><select>'+
		'<option value="0">中国</option>'+
		'</select></div>'+
		'<div class="subselector province"><select>'+
		'<option value="0">广东省</option>'+
		'</select></div>'+
		'<div class="subselector city"><select>'+
		'<option value="0">广州市</option>'+
		'</select></div>'+
		'<div class="subselector district"><select>'+
		'<option value="0">番禺区</option>'+
		'</select></div>'+
		'<div class="clear"></div>'+
		'</div>'+
		'</li>'+
		'<li class="livetownselect">'+
		'所&nbsp;在&nbsp;地&nbsp;:<input type="text" class="inputframe basicchange_livetown " value="'+basic.livetown+'"/>'+
		'<div class="editselectboard selectboard_area livetownboard">'+
		'<div class="subselector country"><select>'+
		'<option value="0">中国</option>'+
		'</select></div>'+
		'<div class="subselector province"><select>'+
		'<option value="0">广东省</option>'+
		'</select></div>'+
		'<div class="subselector city"><select>'+
		'<option value="0">广州市</option>'+
		'</select></div>'+
		'<div class="subselector district"><select>'+
		'<option value="0">番禺区</option>'+
		'</select></div>'+
		'<div class="clear"></div>'+
		'</div>'+

		'</li>'+
		'<li class="">'+
		'地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址&nbsp;:<input type="text" class="inputframe detailchange_address " value="'+detail.address+'"/>'+
		'</li>'+
		'<li class="">'+
		'<span class="">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编&nbsp;:<input type="text" class="inputframe detailchange_mailcode " value="'+detail.mailcode+'"/></span>'+
		'</li>'+
		'</ul>'+
		'</div><!--修改资料page end-->'+
		'</div><!--修改资料cnt end-->'+
		'</div><!--修改资料board end-->';
		return editintrohtml;
	}
	
	var setpercentbar=function(uid,fid_or_type,basic,detail)
	{
		
		if(detail!=undefined)
		{
			detail.id=undefined;
			var count=0;
			for(var i in detail)
			{
				if(detail[i]!=undefined&&detail[i]!='')
				{
					count+=1;
				}
			}
		}					
		basic.sign.length>0?count+=1:'';
		basic.birthday.length>0?count+=1:'';
		basic.hometown.length>0?count+=1:'';
		basic.livetown.length>0?count+=1:'';
		basic.email.length>0?count+=1:'';
		basic.sex.length>0?count+=1:'';
		var per=Math.round(count/27);
		console.log('count='+count+' per='+per);
		$('#userintrocard_'+fid_or_type+'_'+uid+' .intropercentage').attr('title','当前资料完成度'+(per*100)+'%');
		$('#userintrocard_'+fid_or_type+'_'+uid+' .intropercentage .intropercentage_complete').css('width',(per*100)+'%');
	}


	var _bind=function()
	{
		drag($(".userintrocard"));

		$('.userintrocard_close').click(function()
		{
			$(this).parents('.userintrocard').remove();
		});

		/*点击切换翻页*/
		$('.userintrocard_column_pagebtn').click(function()
		{
			var type=$(this).attr('class').replace('userintrocard_column_pagebtn column_pagebtn_','');
			$(this).parents('.userintrocard_column').attr('class','userintrocard_column opencard_'+type);
		});


		
		/*各页面滚动设置*/
		$('.userintrocard_introcntbox').mouseover(function()
		{
			Scroll.set($(this),$(this).find('.userintrocard_introcntbox_cnt'),$(this).find('.userintrocard_introcntbox_page'));
			console.log($(this)[0].offsetWidth);
			if($(this).find('.userintrocard_introcntbox_page')[0].offsetWidth<456)
			{
				$(this).find('.userintrocard_introphoto_box').css('margin-left',"1px");
			}
			else
			{
				$(this).find('.userintrocard_introphoto_box').css('margin-left',"8px");
			}
		});
		
		$('.userintrocard_dynamicpage').mouseover(function()
		{
			Scroll.set($(this),$(this).find('.userintrocard_dynamicpage_cnt'),$(this).find('.userintrocard_dynamicpage_page'));
		});


		/*概览页*/
		$('.userintrocard_intro_toptoolbarcnt .editmyintro').click(function()
		{
			$(this).parents('.userintrocard_intropage').addClass('userintrocard_introediting');
		});
		$('.userintrocard_intro_toptoolbarcnt .closeedit').click(function()
		{
			$(this).parents('.userintrocard_intropage').removeClass('userintrocard_introediting');
		});


		//点击打开更换头像框
		$('.introheadcnt_changeuserhead').click(function(e)
		{
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			if(uid.length<=0)
			{
				return false;
			}
			uid=uid[1];



			e.stopImmediatePropagation();
		});

	}
	
	//信息框绑定事件函数
	var _infobind=function()
	{

		//资料页-左滚动
		$('.userintrocard_introphoto_leftbtn').click(function(e)
		{
			if($(this).hasClass('disabled'))
			{
				return false;
			}
			var box=$(this).parent('.userintrocard_introphoto_left').siblings('.userintrocard_introphoto_box').find('.userintrocard_introphoto_boxpage');
			var page=box.attr('page');
			var num=box.find('.userintrocard_introphoto_cnt').length;
			//console.log('page='+page);
			if(Math.ceil(num/5)>=page&&page>1)
			{
				var left=-(page-1)*408+408-2;
				//console.log('left='+left);
				box.css('left',left+'px').attr('page',parseInt(page)-1);
				if(page==1)
				{
					$(this).addClass('disabled');
				}
			}
			if(Math.ceil(num/4)>page)
			{
				$(this).parent('.userintrocard_introphoto_left').siblings('.userintrocard_introphoto_right').find('.userintrocard_introphoto_rightbtn').removeClass('disabled');
			}
			e.stopImmediatePropagation();
		});

		//资料页-右滚动
		$('.userintrocard_introphoto_rightbtn').click(function(e)
		{
			if($(this).hasClass('disabled'))
			{
				return false;
			}
			var box=$(this).parent('.userintrocard_introphoto_right').siblings('.userintrocard_introphoto_box').find('.userintrocard_introphoto_boxpage');
			var page=box.attr('page');
			var num=box.find('.userintrocard_introphoto_cnt').length;
			if(Math.ceil(num/5)>page)
			{
				var right=-page*408-2;
				//console.log('right='+right);
				box.css('left',right+'px').attr('page',parseInt(page)+1);
				$(this).parent('.userintrocard_introphoto_right').siblings('.userintrocard_introphoto_left').find('.userintrocard_introphoto_leftbtn').removeClass('disabled');
				if(Math.ceil(num/4)==page)
				{
					$(this).addClass('disabled');
				}
			}
			
			e.stopImmediatePropagation();
		});














		//编辑资料页-滚动
		$('.userintrocard_editintrocntbox').mouseover(function()
		{
			Scroll.set($(this),$(this).find('.userintrocard_editintrocntbox_cnt'),$(this).find('.userintrocard_editintrocntbox_page'));
		}).click(function(e)
		{
			var t=$(e.target);

			if(!t.hasClass('subselector')&&!t.hasClass('editselectboard')&&!t.parent('div').hasClass('subselector'))
			{
				if(t.hasClass('inputframe'))
				{
					//编辑资料页-生日输入框点击后显示日期选择
					if(t.parents('li').hasClass('li_birthday'))
					{
						if(t.parent('.birthdayselect').siblings('.selectboard_birthday').css('display')=='none')
						{
							$(this).find('.editselectboard').css('display','none');
							t.parent('.birthdayselect').siblings('.selectboard_birthday').css('display','block');
						}
						t.blur();
						e.stopImmediatePropagation();
					}
					//编辑资料页-居住地、故乡输入框点击后显示地区选择
					else if(t.parent('li').hasClass('livetownselect')||t.parent('li').hasClass('hometownselect'))
					{
						console.log(t.siblings('.editselectboard').css('display'));
						if(t.siblings('.editselectboard').css('display')=='none')
						{
							$(this).find('.editselectboard').css('display','none');
							t.siblings('.editselectboard').css('display','block');
						}
						t.blur();
						e.stopImmediatePropagation();
					}
					else
					{
						$(this).find('.editselectboard').css('display','none');
					}
				}
				else
				{
					$(this).find('.editselectboard').css('display','none');
				}

			}

		});
		
		

		//编辑资料页-签名修改
		$('.usersignbox_input').change(function(e)
		{
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			if(uid.length<=0)
			{
				return false;
			}
			uid=uid[1];
			var str=$.trim($(this).val());
			_ajaxget('type=setsign&&needid='+uid+'&&str='+str,'get_userinfos',function(m)
			{
				if(m=='ok')
				{
					usr.setpro(uid,'sign',str);
					$('.owner_'+uid+' .usersign_all').html(str).val(str);
					user.sign=str;
					console.log('修改签名成功');
				}
				else
				{
					console.log('修改签名失败');
				}

			});
			
			e.stopImmediatePropagation();
		});


		//编辑资料页-选择框内容改变事件
		$('.userintrocard_editintrolist .inputframe select').change(function(e)
		{
			var type=$(this).attr('class').replace('userinfosetselect_','');
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			uid=uid[1];
			var val=$(this).find('option:selected').val();
			console.log(type+'选择了->'+val);
			if(type=='sex')
			{
				tempval.setone(uid,'userbasic',type,val);
			}
			else
			{
				tempval.setone(uid,'userdetail',type,val);
			}
			$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
			e.stopImmediatePropagation();
		});

		//编辑资料页-输入框改变内容事件
		$('.userintrocard_editintrolist .inputframe').change(function(e)
		{
			
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			uid=uid[1];
			var val=$(this).val();
			console.log('uid='+uid+' val='+val);
			var dtype=/detailchange_([a-zA-Z]+)/.exec($(this).attr('class'));
			if(dtype!=undefined&&dtype!=null&&dtype!="")
			{
				dtype=dtype[1];
				tempval.setone(uid,'userdetail',dtype,val);
			}
			var btype=/basicchange_([a-zA-Z]+)/.exec($(this).attr('class'));
			if(btype!=undefined&&btype!=null&&btype!="")
			{
				btype=btype[1];
				tempval.setone(uid,'userbasic',btype,val);
			}
			
			$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
			e.stopImmediatePropagation();
		});
		
		
		//编辑资料页-保存按钮点击后更新到服务器
		/*
		1，更新到服务器；2，更新到资料卡；3,更新到修改资料卡
		*/
		$('.userintrocard_intro_toptoolbar .saveedit').click(function(e)
		{
			if($(this).hasClass('disable'))
			{
				return false;
			}
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			if(uid.length<=0)
			{
				return false;
			}
			uid=uid[1];
			
			var userdetail=tempval.getoneall(uid,'userdetail');
			var detail='';
			
			if(userdetail!=false&&userdetail!=null)
			{	
				userdetail['id']=undefined;
				for(var i in userdetail)
				{
					if(typeof userdetail[i]!='Function'&&i!='id')
					{
						if(i=='imgarr')
						{
							console.log('imgarr');
							console.log(userdetail[i]);
							for(var k=0;k<userdetail[i].length;k++)
							{
								imgsend(uid,userdetail[i][k].obj,userdetail[i][k].name,'imgupload',function(uid,fileobj,filename)
								{

								});
							}
						}
						else
						{
							detail+=i+"-"+userdetail[i]+";";
						}
					}
				}
				
			}

			var userbasic=tempval.getoneall(uid,'userbasic');
			var basic='';
			
			if(userbasic!=false&&userbasic!=null)
			{
				userbasic['id']=undefined;
				for(var i in userbasic)
				{
					if(typeof userbasic[i]!='Function'&&i!='id')
					{
						basic+=i+"-"+userbasic[i]+";";
					}
				}
				
			}
			
			$(this).addClass('disable');
			
			_ajaxget('type=update&&needid='+uid+'&&detail='+detail+'&&basic='+basic,'get_userinfos',function(m)
			{
				if(m=='ok')
				{
					for(var i in userbasic)
					{
						if(i!='id')
						{
							usr.setpro(uid,''+i,userbasic[i]);
							user[i]=userbasic[i];
						}
					}
					//修改到签名
					if(userbasic['sign']!=undefined)
					{
						$('.owner_'+uid+' .usersign_all').html(userbasic['sign']).val(userbasic['sign']);
					}
					//修改到昵称
					if(userbasic['name']!=undefined)
					{
						$('.owner_'+uid+' .username_all').html(userbasic['name']);
					}

					tempval.cleanoneall(uid,'userbasic');
					tempval.cleanoneall(uid,'userdetail');
					loadpage(uid,'self','intro');
				}
				else
				{
					$(this).removeClass('disable');
				}

			},function(m)
			{
				$(this).removeClass('disable');
			},false);
			
			e.stopImmediatePropagation();
		});
		//编辑资料页-关闭按钮点击后清空临时编辑数据
		$('.userintrocard_intro_toptoolbar .closeedit').click(function(e)
		{
			$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			if(uid.length<=0)
			{
				return false;
			}
			uid=uid[1];
			tempval.cleanoneall(uid,'userbasic');
			tempval.cleanoneall(uid,'userdetail');
			loadpage(uid,'self','intro');
			e.stopImmediatePropagation();
		});

		//编辑资料页-编辑资料按钮点击后获取编辑信息
		$('.userintrocard_intro_toptoolbar .editmyintro').click(function(e)
		{
			
			e.stopImmediatePropagation();
		});



		//编辑资料页-添加照片按钮
		$('.editintrophoto_addinput').change(function(e)
		{
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			uid=uid[1];
			var ts=e.target;
		
			var boxpage=$(this).parents('.userintrocard_editintrophoto_boxpage');
			var d=new Date();
			var name=getrand(6);
			var id="imgview_"+d.getTime()+name;
		
			if(ts.files&&ts.files[0])
			{
				//如果不是图片格式，返回并提示
				if(!/image\/\w+/.test(ts.files[0].type))
				{
					console.log("您选择的不是图片噢");
					return false;
				}
				var filename=ts.files[0].name.split('.');
				var format=filename[filename.length-1].toLowerCase();

				boxpage.append('<div class="userintrocard_editintrophoto_cnt"><img format="'+format+'" name="'+id+'"  class="editintrophoto_ready"><img src="img/ContactInfoFrame/qzone/btn_close_highlight.png" class="editintrophoto_del"/></div>');
				
				var fr=new FileReader();
				fr.onload=function(e)
				{
					boxpage.find("img[name='"+id+"']").attr("src",e.target.result);
				}
				fr.readAsDataURL(ts.files[0]);
				var tobj={obj:ts.files[0],name:id+'.'+format};
				//console.log('uid='+uid);
				var imgshow=tempval.getone(uid,'userdetail','imgshow');
				console.log(imgshow);
				imgshow==false?imgshow='':'';
				imgshow+='upload/'+id+'.'+format+',';
				tempval.setone(uid,'userdetail','imgshow',imgshow);

				var imgarr=tempval.getone(uid,'userdetail','imgarr');
				//console.log(imgarr);
				imgarr==false?imgarr=[]:'';
				imgarr.push(tobj);
				//console.log(imgarr);
				tempval.setone(uid,'userdetail','imgarr',imgarr);

				$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
			}
			
			e.stopImmediatePropagation();
		});
		
		//编辑资料页-删除图片按钮
		$('.editintrophoto_del').click(function(e)
		{
			$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			uid=uid[1];
			var imgsrc=$(this).siblings('.editintrophoto_ready').attr('src');
			var imgshow=tempval.getone(uid,'userdetail','imgshow');
			//console.log(imgshow+','+imgsrc);
			imgshow=imgshow.replace(imgsrc+',','');
			//console.log(imgshow);
			tempval.setone(uid,'userdetail','imgshow',imgshow);
			$(this).parent('.userintrocard_editintrophoto_cnt').remove();
			//console.log($(this).index());

			
			e.stopImmediatePropagation();
		});

		//编辑资料页-左滚动
		$('.userintrocard_editintrophoto_leftbtn').click(function(e)
		{
			if($(this).hasClass('disabled'))
			{
				return false;
			}
			var box=$(this).parent('.userintrocard_editintrophoto_left').siblings('.userintrocard_editintrophoto_box').find('.userintrocard_editintrophoto_boxpage');
			var page=box.attr('page');
			var num=box.find('.userintrocard_editintrophoto_cnt').length;
			//console.log('page='+page);
			if(Math.ceil(num/4)>=page&&page>1)
			{
				var left=-(page-1)*408+408-2;
				//console.log('left='+left);
				box.css('left',left+'px').attr('page',parseInt(page)-1);
				if(page==1)
				{
					$(this).addClass('disabled');
				}
			}
			if(Math.ceil(num/4)>page)
			{
				$(this).parent('.userintrocard_editintrophoto_left').siblings('.userintrocard_editintrophoto_right').find('.userintrocard_editintrophoto_rightbtn').removeClass('disabled');
			}
			e.stopImmediatePropagation();
		});

		//编辑资料页-右滚动
		$('.userintrocard_editintrophoto_rightbtn').click(function(e)
		{
			if($(this).hasClass('disabled'))
			{
				return false;
			}
			var box=$(this).parent('.userintrocard_editintrophoto_right').siblings('.userintrocard_editintrophoto_box').find('.userintrocard_editintrophoto_boxpage');
			var page=box.attr('page');
			var num=box.find('.userintrocard_editintrophoto_cnt').length;
			if(Math.ceil(num/4)>page)
			{
				var right=-page*408-2;
				//console.log('right='+right);
				box.css('left',right+'px').attr('page',parseInt(page)+1);
				$(this).parent('.userintrocard_editintrophoto_right').siblings('.userintrocard_editintrophoto_left').find('.userintrocard_editintrophoto_leftbtn').removeClass('disabled');
				if(Math.ceil(num/4)==page)
				{
					$(this).addClass('disabled');
				}
			}
			
			e.stopImmediatePropagation();
		});
		

		/*
		//编辑资料页-
		$('.').(function(e)
		{
			
			e.stopImmediatePropagation();
		});
		
		*/
		
		
		//编辑资料页-子选择框内容改变事件
		$('.userintrocard_editintrolist .editselectboard .subselector select').change(function(e)
		{
			var uid=/userintrocard_self_(\d+)/.exec($(this).parents('.userintrocard').attr('id'));
			uid=uid[1];	
			

			var eb=$(this).parents('.editselectboard');
			if(eb.hasClass('selectboard_birthday'))
			{
				var binput=$(this).parents('.selectboard_birthday').siblings('.birthdayselect').find('input');
				var time=0;
				var val=$(this).find('option:selected').val();
				var sub=$(this).parent('.subselector');
				if(sub.hasClass('year'))
				{
					var mon=eb.find('.month select').find('option:selected').val();
					var dayop=eb.find('.day select').find('option');
					var day=eb.find('.day select').find('option:selected').val();

					var days=howmuchdays(val,mon);
					
					if(dayop.length!=days)
					{
						var dhtml='';
						for(var i=1;i<=days;i++)
						{
							dhtml+='<option value="'+i+'" '+(i==day?'selected':'')+'>'+i+'日</option>';
						}
						eb.find('.day select').html(dhtml);
						day=eb.find('.day select').find('option:selected').val();
					}

					binput.val(val+'年 '+mon+'月 '+day+'日');
					time=val+'/'+mon+'/'+day;
				}
				else if(sub.hasClass('month'))
				{
					var year=eb.find('.year select').find('option:selected').val();
					var dayop=eb.find('.day select').find('option');
					var day=eb.find('.day select').find('option:selected').val();

					var days=howmuchdays(year,val);
					
					if(dayop.length!=days)
					{
						var dhtml='';
						for(var i=1;i<=days;i++)
						{
							dhtml+='<option value="'+i+'" '+(i==day?'selected':'')+'>'+i+'日</option>';
						}
						eb.find('.day select').html(dhtml);
						day=eb.find('.day select').find('option:selected').val();
					}

					binput.val(year+'年 '+val+'月 '+day+'日');
					time=year+'/'+val+'/'+day;

				}
				else if(sub.hasClass('day'))
				{
					var year=eb.find('.year select').find('option:selected').val();
					var mon=eb.find('.month select').find('option:selected').val();
					binput.val(year+'年 '+mon+'月 '+val+'日');
					time=year+'/'+mon+'/'+val;
				}
				time=new Date(time).getTime()/1000;

				tempval.setone(uid,'userbasic','birthday',time+"");
				//console.log(usr.getuser(uid));
			}
			else if(eb.hasClass('selectboard_area'))
			{
				/*
				Location->CountryRegion->State->City
				*/
				var area=$(this).parents('.selectboard_area');
				var binput=area.siblings('input');
				var code=$(this).find('option:selected').val();
				var name=$(this).find('option:selected').html();
				var sub=$(this).parent('.subselector');
				var obj={code:code,name:name};
				
				if(sub.hasClass('country'))
				{
					setintroplace(eb,1,obj);
				}
				else if(sub.hasClass('province'))
				{
					setintroplace(eb,2,obj);
				}
				else if(sub.hasClass('city'))
				{
					setintroplace(eb,3,obj);
				}
				else if(sub.hasClass('district'))
				{
					//lv=4;
				}
				
				var select=area.find('select');
				var place='';
				for(var i=0;i<select.length;i++)
				{
					place+=select.eq(i).find('option:selected').html()==undefined?'':select.eq(i).find('option:selected').html()+' ';
				}
				var type='';
				if(area.hasClass('livetownboard'))
				{
					type='livetown';
				}
				else if(area.hasClass('hometownboard'))
				{
					type='hometown';
				}
				binput.val(place);
				tempval.setone(uid,'userbasic',type,place);
				

			}


					
			$(this).parents('.userintrocard_editintrocntbox').siblings('.userintrocard_intro_toptoolbar').find('.saveedit').removeClass('disable');
		
			e.stopImmediatePropagation();
		});



		



	}//信息框绑定事件函数
	
	
	//
	










}

function setintroplace(eb,lv,code)
{
	var xmlobj=null;
	getxmlval('LocList',function(xml)
	{
		xmlobj=$(xml);
	});
	var tree=getxmlchild(xmlobj,['CountryRegion','State','City','Region'],lv,code);
	//console.log(tree);
	
	//console.log(tree);
	if(lv==1&&code==undefined)
	{
		var country='';
		for(var i=0;i<tree['CountryRegion'].length;i++)
		{
			country+=tree['CountryRegion'][i]['Code']==undefined?'':'<option value="'+tree['CountryRegion'][i]['Code']+'">'+tree['CountryRegion'][i]['Name']+'</option>';
		}
		eb.find('.country select').html(country);
	}
	if(lv==1)
	{	
		
		var province='';
		for(var i=0;i<tree['State'].length;i++)
		{
			province+=tree['State'][i]['Code']==undefined?'':'<option value="'+tree['State'][i]['Code']+'">'+tree['State'][i]['Name']+'</option>';
		}
		eb.find('.province select').html(province);
	}
	if(lv==1||lv==2)
	{
		var city='';
		for(var i=0;i<tree['City'].length;i++)
		{
			city+=tree['City'][i]['Code']==undefined?'':'<option value="'+tree['City'][i]['Code']+'">'+tree['City'][i]['Name']+'</option>';
		}
		eb.find('.city select').html(city);
	}
	if(lv==1||lv==2||lv==3)
	{
		var Region='';
		for(var i=0;i<tree['Region'].length;i++)
		{
			Region+=tree['Region'][i]['Code']==undefined?'':'<option value="'+tree['Region'][i]['Code']+'">'+tree['Region'][i]['Name']+'</option>';
		}
		eb.find('.district select').html(Region);
	}
}